﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics.CodeAnalysis;

namespace WpfExceptionWindow
{
    /// <summary>
    /// Specifies which exception window button that a user clicks.
    /// </summary>
    public enum ExceptionWindowResult
    {
        /// <summary>
        /// The exception window returns no result
        /// </summary>
        None,
        /// <summary>
        /// The result value of the exception window is <b>Abort</b>. 
        /// </summary>
        Abort,
        /// <summary>
        /// The result value of the exception window is <b>Continue</b>. 
        /// </summary>
        Continue,
        /// <summary>
        /// The result value of the exception window is <b>Retry</b>. 
        /// </summary>
        Retry,
        /// <summary>
        /// The result value of the exception window is <b>Restart</b>. 
        /// </summary>
        Restart
    }

    /// <summary>
    /// Specifies the buttons that are displayed in an exception window.
    /// </summary>
    public enum ExceptionWindowButton
    {
        /// <summary>
        /// The exception window displays a <b>Abort</b> button.
        /// </summary>
        Abort,
        /// <summary>
        /// The exception window displays <b>Abort</b> and <b>Continue</b> buttons.
        /// </summary>
        AbortContinue,
        /// <summary>
        /// The exception window displays <b>Abort</b> and <b>Retry</b> buttons.
        /// </summary>
        AbortRetry,
        /// <summary>
        /// The exception window displays <b>Abort</b> and <b>Restart</b> buttons.
        /// </summary>
        AbortRestart,
        /// <summary>
        /// The exception window displays <b>Abort</b>, <b>Continue</b> and <b>Retry</b> buttons.
        /// </summary>
        AbortContinueRetry,
        /// <summary>
        /// The exception window displays <b>Abort</b>, <b>Continue</b> and <b>Restart</b> buttons.
        /// </summary>
        AbortContinueRestart
    }


    /// <summary>
    /// Specifies the image to display in an exception window.
    /// </summary>
    [SuppressMessage("Microsoft.Design", "CA1027:MarkEnumsWithFlags",
        Justification = "Cannot be combined into flags")]
    public enum ExceptionWindowImage
    {
        ///<summary>
        /// No icon is displayed
        ///</summary>
        None = 0,
        ///<summary>
        /// The exception window displays an error icon.
        ///</summary>
        Error = 16,
        ///<summary>
        /// The exception window displays an hand icon.
        ///</summary>
        Hand = 16,
        ///<summary>
        /// The exception window displays an stop icon.
        ///</summary>
        Stop = 16,
        ///<summary>
        /// The exception window displays an question mark icon.
        ///</summary>
        Question = 32,
        ///<summary>
        /// The exception window displays an exclamation mark icon.
        ///</summary>
        Exclamation = 48,
        ///<summary>
        /// The exception window displays an warning icon.
        ///</summary>
        Warning = 48,
        ///<summary>
        /// The exception window displays an information icon.
        ///</summary>
        Information = 64,
        ///<summary>
        /// The exception window displays an asterisk icon.
        ///</summary>
        Asterisk = 64,
    }

    /// <summary>
    /// Specifies special display options for an exception window.
    /// </summary>
    [Flags()]
    public enum ExceptionWindowOptions
    {
        /// <summary>
        /// No options are set.
        /// </summary>
        None = 0,
        /// <summary>
        /// The exception window text is right aligned.
        /// </summary>
        RightAlign = 1,
        /// <summary>
        /// All text, buttons, icons and title bars are displayed right-to-left.
        /// </summary>
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Rtl",
            Justification = "Standard Microsoft naming format")]
        RtlReading = 2
    }
}
